import request from "@/plugins/request";
let pre = "/messNotice";

if (process.env.NODE_ENV !== "development") {
  pre = "/api/ps/mess-center" + pre;
}

// 分页查询我的通知公告
export function queryMyNotices(data) {
  return request({
    url: `${pre}/queryMyNotices`,
    method: "post",
    data,
  });
}

// 查询站内信基本信息详情
export function queryNoticeDetail(noticeId) {
  return request({
    url: `${pre}/queryNoticeDetail?noticeId=${noticeId}`,
    method: "get",
  });
}

// 设置单条通知公告已读
export function setNoticeRead(noticeId) {
  return request({
    url: `${pre}/setNoticeRead?noticeId=${noticeId}`,
    method: "get",
  });
}